package com.example.spark.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.spark.entity.Leader;
import com.example.spark.entity.dto.PaginationDTO;
import com.example.spark.entity.result.CommonResult;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface LeaderService extends IService<Leader> {
    /**
     * 获取负责人
     */
    CommonResult<IPage<Leader>> getAll(PaginationDTO<Leader> pageDto);

    /**
     * 添加负责人
     */
    CommonResult<Leader> saveOne(Leader leader) throws IOException;

    /**
     * 删除负责人
     */

    CommonResult<Long> deleteById(Long ids);

    /**
     * 修改负责人
     */

    CommonResult<Leader> updateOne(Leader leader);

    CommonResult<String> updatePhoto(MultipartFile photo, Long id) throws IOException;

    CommonResult<List<Leader>> getLeaders();
}
